package com.soft.mainsite.module.data.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * Created by IntelliJ IDEA.
 *
 * @Author: hjm
 * @Date: 2020/11/25 0:30
 * Stay hungry,stay foolish!
 */
@Data
@ApiModel(value = "文件上传实体")
public class MainData implements Serializable{

    @ApiModelProperty(value = "自增id")
    private Integer id;

    @ApiModelProperty(value = "资料标题")
    private String dataTitle;

    @ApiModelProperty(value = "资料简介")
    private String dataBrief;

    @ApiModelProperty(value = "资料封面图")
    private String dataCover;

    @ApiModelProperty(value = "资料文件")
    private String dataFile;

    @ApiModelProperty(value = "资料所属分类id")
    private Integer categoryId;

    @ApiModelProperty(value = "资料学科分类名字")
    private String categoryName;

    @ApiModelProperty(value = "是否删除，0 未删除，1已删除")
    private Integer isDel;

    @ApiModelProperty(value = "创建人")
    private String createUser;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT +8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty(value = "更新人")
    private String updateUser;

    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT +8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @ApiModelProperty(value = "资料是否被领取，0未领取，1已领取")
    @TableField(exist = false)
    private Integer isReceived;

    @ApiModelProperty(value = "资料是否被收藏，0未收藏，1已收藏")
    @TableField(exist = false)
    private Integer isFavorite;

    @ApiModelProperty(value = "用户手机号")
    @TableField(exist = false)
    private String userPhone;
}
